This invention relates to hardware loops implemented in a programmable processor.
In designing a programmable processor, such as a digital signal processing (DSP) system, two competing design goals are processing speed and power consumption. Conventional processors include a variety of hardware designed to increase the speed at which software instructions are executed. The additional hardware, however, typically increases the power consumption of the processor.
One technique for increasing the speed of a programmable processor is a xe2x80x9chardware loop,xe2x80x9d which may be dedicated hardware designed to expedite the execution of software instructions within a loop construct. Hardware loops may reduce the number of clock cycles used to execute a software loop by caching the instructions in local registers, thereby reducing the need to fetch the same instruction from a memory device or instruction cache a plurality of times.
Hardware loops introduce several challenges. These challenges include avoiding penalties such as setup penalties or branch penalties. Setup penalties are the loss of performance (usually an increase in processing time) associated with setting up a hardware loop. Similarly, branch penalties are the loss of performance (again, usually an increase in processing time) associated with a branch.